#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename msg16000_csbuf.py
# package ptl

from ptl.base_csbuf import *


# message Resp16001
class Resp16001:
	def __init__(self):
		self.protoid = 16001
		self.list = []

	def Marshal(writer):
		countlist = len(self.list)
		writer.setArray(countlist, 1)
		for i in range(countlist):
			writer.setMessage(0)
			self.list[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = ChatInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.list.append(msg)
# message Req16002
class Req16002:
	def __init__(self):
		self.protoid = 16002
		self.msg_type = 0
		self.data_type = 0
		self.content = ""
		self.audio_path = ""
		self.audio_time = 0
		self.target_playerIds = []
		self.teamId = 0

	def Marshal(writer):
		writer.setUint32(self.msg_type, 1)
		writer.setUint8(self.data_type, 2)
		writer.setString(self.content, 3)
		writer.setString(self.audio_path, 4)
		writer.setUint32(self.audio_time, 5)
		counttarget_playerIds = len(self.target_playerIds)
		writer.setArray(counttarget_playerIds, 6)
		for i in range(counttarget_playerIds):
			writer.setUint32(self.target_playerIds[i], 0)
		writer.setUint64(self.teamId, 7)

	def Unmarshal( reader):
		self.msg_type = reader.getUint32(1)
		self.data_type = reader.getUint8(2)
		self.content = reader.getString(3)
		self.audio_path = reader.getString(4)
		self.audio_time = reader.getUint32(5)
		for i in range(reader.getArray(6)):
			self.target_playerIds.append(reader.getUint32(0))
		self.teamId = reader.getUint64(7)
# message Resp16002
class Resp16002:
	def __init__(self):
		self.protoid = 16002
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
